Draft Comparing Two Garbage Collectors for C++

نویسنده

  • Daniel R. Edelson
چکیده

Our research is concerned with compiler-independent, tag-free garbage collection for the C ++ programming language. This paper presents a mark-and-sweep collector , and explains how it ameliorates shortcomings of a previous copy collector. The new collector, like the old, uses C ++ 's facilities for creating abstract data types to deene a tracked reference type, called roots, at the level of the application program. A programmer wishing to utilize the garbage collection service uses these roots in place of normal, raw pointers. We present a detailed study of the cost of using roots, as compared to both normal pointers and reference counted pointers, in terms of instruction counts. We examine the eeciency of a small C++ application using roots, reference counting, manual reclamation, and conservative collection. Coding the application to use garbage collection, and analyzing the resulting ee-ciency, helped us identify a number of memory leaks and ineeciencies in the original, manually reclaimed version. We nd that for this program, garbage collection using roots is much more eecient than reference counting, though less eecient than manual reclamation. It is hard to directly compare our collector to the conservative collector because of the diiering ee-ciencies of their respective memory allocators. This paper is a longer, more thorough version of a paper that appears in POPL '92 under the title, A mark-and-sweep collector for C++.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

ارزیابی عملکرد ریوی گروهی از پاکبانان شهرداری استان فارس در سال 1391

Background: Garbage collectors form a large group of municipal workers who have occupational exposure to different airborne contaminants. The aim of this study was to evaluate the respiratory health of a group of garbage collectors who were working in Fars province. Methods: This cross-sectional study was undertaken among a group of 105 garbage collectors and 93 referrent individuals. Subjects...

متن کامل

Conservative Garbage Collectors for Realtime Audio Processing

Garbage-producing and efficient programming languages such as Haskell, Lisp or ML have traditionally not been used for generating individual samples in realtime. The reason is a lack of garbage collector fast and predictably enough to make these languages viable alternatives to C and C++ for high performing audio DSP. This paper shows how conservative garbage collectors can be used efficiently ...

متن کامل

A Comparative Evaluation of Parallel Garbage Collector Implementations

While uniprocessor garbage collection is relatively well understood, experience with collectors for large multiprocessor servers is limited and it is unknown which techniques best scale with large memories and large numbers of processors. In order to explore these issues we designed a modular garbage collection framework in the IBM Jalapeño Java virtual machine and implemented five different pa...

متن کامل

Distributed from The Derivation of Termination Detection Algorithms Garbage Collection Schemes

A b s t r a c t . It is shown that the termination detection problem for distributed computations can be modeled as an instance of the garbage collection problem. Consequently, algorithms for the termination detection problem are obtained by applying trausformations to garbage collection algorithms. The transformation can be applied to collectors of the "mark-and-sweep" type as well as to refer...

متن کامل

Collection Schemes for Distributed Garbage

With the continued growth in interest in distributed systems, garbage collection is actively receiving attention by designers of distributed languages [Bal, 1990]. Distribution adds another dimension of complexity to an already complex problem. A comprehensive review and bibliography of distributed garbage collection literature up to 1992 is presented. As distributed collectors are largely base...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1992